🎶 Discovering mental disorders in literary characters 🌍

What literary work can tell us about mental health history?

🎵 About the project

In this project, we tried to diagnose literary characters with mental disorders according to International Classification of Diseases (ICD).

This project was developed within the university class.

Madness is a very prominent yet controversial topic; every society in different periods of time approached it differently. Some cultures ostracize and isolate "crazy" people, some cultures hold them for saint. It hasn't been so long since psychiatry developed as a science, and the classfication and diagnostic criteria for various disorders were developed (let alone the fact that what is considered as a disorder has also undergone changes).

Many writers have described madness in their work without having any labels for the disorders.

Some traits weren't recognized as symptoms even; for instance, sleeping all the time and having no energy could be acribed to lazyness and faulty character rather than, say, depression, and what is now considered as a bipolar disorder could be viewed as a moody personality. Since strict labels and diagnostic criteria didn't exist, we can only assume which disorders the authors described. And since writers often capture the spirit of their time in their work - whether by choice or by design - we can estimate societal views and attitudes to madness from their writings.

There are many questions one can pose:

This work is an attempt to address some of these questions using computational approach.

There are many questions one can pose:

  1. Get descriptions of characters. For this step, we used ChatGPT using the same prompt for each character. If ChatGPT was confused or tried to claim such a character doesn't exist, we discarded the character to not include false data on purpose. While this step is not perfect, it allowed us to get preliminary descriptions of each character that were of the same size, style, and format.
  2. Get descriptions of disorders. For this step, we used API of the ICD.
  3. Preprocess descriptions (tokenize, remove stop-words, lemmatize, etc.)
  4. Convert all descriptions into embeddings.
  5. We used sentence transformers.
  6. Compute the cosine similarity between each character and each disorder description.
  7. Process and visualize the results (group by gender, time, country).

Explore literary characters of:
Explore literary characters of:
Explore literary characters of:
Explore literary characters of: